package com.tcs.test.single.singletions;

/**
 * 懒汉模式, 线程不安全
 */
public class Singletion2 {

    private static Singletion2 singletion1 = null;

    private Singletion2() {
        System.out.println(" 懒汉模式 ");
    }

    public static Singletion2 getSingletion1() {
        if (singletion1 == null) {
            singletion1 = new Singletion2();
        }
        return singletion1;
    }
}
